package gen.kaynak.navitrack.messageProcessState;

public class MinuteIntegerProcessing extends ACMessageProcessState {
	private static MinuteIntegerProcessing state = new MinuteIntegerProcessing();

	private MinuteIntegerProcessing() {

	}

	public static ACMessageProcessState Instance() {
		return state;

	}

	@Override
	void ProcessWhiteSpace(char c, MessageProcessStateManager mpm) {
		mpm.calculateMinutes();
		ChangeState(mpm, MinuteDiscovered.Instance());

	}

	@Override
	void ProcessLetter(char c, MessageProcessStateManager mpm) {
		mpm.calculateMinutes();
		ChangeState(mpm, MinuteDiscovered.Instance());

	}

	@Override
	void ProcessPunctuation(char c, MessageProcessStateManager mpm) {
		switch (c) {
		case '.':
			mpm.appendMinutes(c);
			ChangeState(mpm, MinuteFractionalProcessing.Instance());
		default:
			mpm.calculateMinutes();
			ChangeState(mpm, MinuteDiscovered.Instance());
		}

	}

	@Override
	void ProcessSymbol(char c, MessageProcessStateManager mpm) {
		mpm.calculateMinutes();
		ChangeState(mpm, MinuteDiscovered.Instance());

	}

	@Override
	void ProcessNumber(char c, MessageProcessStateManager mpm) {
		mpm.appendMinutes(c);

	}

}
